package com.hsgene.order.service.api;

import com.hsgene.common.util.result.ApiResult;
import com.hsgene.consumables.domain.v1.GeneticGoods;
import com.hsgene.consumables.domain.v1.GeneticGoodsApplyHistory;
import com.hsgene.order.service.api.impl.ConsumablesGoodsServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author wangbing
 * @version 1.0, 2018/9/21
 */
@FeignClient(name = "ms-mod-consumables", path = "/goods", fallback = ConsumablesGoodsServiceImpl.class)
public interface ConsumablesGoodsService {

    /**
     * 查询id对应的耗材信息
     *
     * @param ids 耗材id，多个以,分隔
     * @return 耗材信息列表
     */
    @GetMapping("")
    ApiResult<List<GeneticGoods>> queryGeneticGoods(@RequestParam("ids") String ids);

    /**
     * 查询地服拥有的耗材使用信息
     *
     * @param groundServantId 地服id
     * @return 耗材使用信息
     */
    @GetMapping("servant")
    ApiResult<List<GeneticGoodsApplyHistory>> queryServantGoods(@RequestParam("groundServantId") String groundServantId);
}
